<table id="toplinks">
	<tr>
		<td><h3>{ $lang.SUBTITLE_MANAGE }</h3></td>
		<td align="right"><a href="{ $SCRIPT_NAME }">{ $lang.LINK_BACK }</a></td>
	</tr>
</table>
<table class="list">
	<tr>
		<td colspan="2"  class="listHead">{ $lang.HEAD_DETAILS }</td>
	</tr>
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_NAME }</td>
		<td class="listNormal">{ $values.name }</td>
	</tr>
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_SIZE }</td>
		<td class="listNormal">{ $values.size_width} x { $values.size_height}</td>
	</tr>
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_OUTPUT_FORMAT }</td>
		<td class="listNormal"><img src="{ $tpldir }images/{ $values.output_format}.png" /></td>
	</tr>
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_RESIZE_MODE }</td>
		<td class="listNormal">{ $values.resize_mode} </td>
	</tr>
	<tr>
		<td class="listFoot" colspan="2"><a href="{ $SCRIPT_NAME }?action=edit&id={ $values.id }">{ $lang.EDIT }</a></td>
	</tr>
</table>
<table class="list">
	<tr>
		<td colspan="2"  class="listHead">{ $lang.HEAD_STATS }</td>
	</tr>
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_REQUESTCOUNT }</td>
		<td class="listNormal">{ $values.requestcount }</td>
	</tr>
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_PARSETIME }</td>
		<td class="listNormal">{ $values.maketime }</td>
	</tr>
	<tr>
		<td class="listFoot" colspan="2"><a href="{ $SCRIPT_NAME }?action=manage&resetstats&id={ $values.id }">{ $lang.LINK_RESET_STATS }</a></td>
	</tr>
</table>
<table class="list">
	<tr>
		<td colspan="2"  class="listHead">{ $lang.HEAD_HOTLINK }</td>
	</tr>
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_HOTLINK_STATUS }</td>
		<td class="listNormal">
		{if $values.hc_mode eq "active"}
			{ $lang.HC_ACTIVE }
		{elseif $values.hc_mode eq "passive"}
			{ $lang.HC_PASSIVE }
		{else}
			{ $lang.HC_DISABLED }
		{/if}
		</td>
	</tr>
	{if $values.hc_mode neq "none"}
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_DOMAINS }</td>
		<td class="listNormal">{ $values.hc_domains | replace: ; : <br \>}</td>
	</tr>
	<tr>
		<td  class="listSubHead" WIDTH="30%">{ $lang.FIELD_BLOCKCOUNT }</td>
		<td class="listNormal">{ $values.hc_blockcount}</td>
	</tr>
	{/if}
	<tr>
		<td class="listFoot" colspan="2"><a href="{ $SCRIPT_NAME }?action=hcedit&id={ $values.id }">{ $lang.LINK_CONFIG_HC }</a></td>
	</tr>
</table>
{if $values.hc_mode eq 'passive'}
<table class="list">
	<tr>
		<td colspan="5" class="listHead">{ $lang.HEAD_DETECTED_HOTLINKS }</td>
	</tr>
	<tr>
		<td class="listSubHead">{ $lang.COL_DOMAIN }</td>
		<td class="listSubHead">{ $lang.COL_COUNT }</td>
		<td class="listSubHead">{ $lang.COL_ALLOW }</td>
		<td class="listSubHead">{ $lang.COL_REFERER }</td>
		<td class="listSubHead">{ $lang.COL_ACTIONS }</td>
	</tr>
	{section name="hclist" loop=$hc_detected}
	<tr>
		<td class="listNormal">{ $hc_detected[hclist].hc_domain }</td>
		<td class="listNormal">{ $hc_detected[hclist].hc_count }</td>
		<td class="listNormal"><img src="{if $hc_detected[hclist].hc_allow eq 1}{ $tpldir }images/check_green.png{else}{ $tpldir }images/check_red.png{/if}" /></td>
		<td class="listNormal"><a href="{ $hc_detected[hclist].hc_full_referer }" target="_blank">{ $lang.LINK_FULL_REFERER }</a></td>
		<td class="listNormal"><a href="{$hc_detected[hclist].hc_actionurl }">{$hc_detected[hclist].hc_actionstr }</a> -  <a href="{ $SCRIPT_NAME }?action=hcedit&delete&id={ $hc_detected[hclist].hc_id }">{ $lang.LINK_DELETE_AVATAR }</td>
	</tr>
	{sectionelse}
	<tr>
		<td class="listNormal" colspan="5" align="center">{ $lang.MSG_NO_HOTLINKS }</td>
	</tr>
	{/section}
</table>
{/if}
<form action="{ $SCRIPT_NAME }?action=manage&addimage&id={ $values.id }" method="post">
<table class="list">
	<tr>
		<td colspan="3"  class="listHead">{ $lang.HEAD_IMAGES }</td>
	</tr>
	{section name=current_images loop=$current_images}
	<tr>
		<td class="listImageRow" colspan="3"><img class="image" rel="lightbox" src="{ $ROOT_DIR }admin/{ #link_thumbnail# }?&amp;{ $current_images[current_images].thumbarg }" /></td>
	</tr>
		<td  class="listSubHead">{ $lang.FIELD_NAME }</td>
		<td  class="listNormal">{ $current_images[current_images].imagename }</td>
		<td class="listColActions"><a href="{ $SCRIPT_NAME }?action=manage&id={ $current_images[current_images].setid }&deleteimage">{ $lang.LINK_DELETE_IMAGE }</a></td>
	</tr>
	<tr>
		<td class="spacer"></td>
	</tr>
	{sectionelse}
	<tr>
		<td colspan="3"  class="listNormal" align="center">{ $lang.MSG_NO_IMAGES }</td>
	</tr>
	{/section}
	<tr>
		<td colspan="3"  class="listHead">{ $lang.HEAD_ADD_IMAGE }</td>
	</tr>
	<tr>
		<td colspan="3" class="listFoot">
			<select name = "sourceimageid" >
				<option value="-1" >{ $lang.FIELD_SELECT_TOP }</option>
				{html_options options=$available_images}
				<option value="-1" > - - - - - - - - - - - - - - </option>
			</select>
			<input type="submit" value="{ $lang.LINK_ADD_IMAGE }">
		</td>
	</tr>
</table>
</form>